<ui:composition template="/pages/template.xhtml" 
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html">
	
	<ui:define name="page">
	
		<h2>Liste catégories</h2>
		
		<h:dataTable value="#{categorieBean.categories}" border="1" var="categorie">
	
			<h:column>
				<f:facet name="header">id</f:facet>
	    		<h:form>
					<h:link outcome="voirCategorie.xhtml" value="#{categorie.id}">
						<f:param name="idCategorie" value="#{categorie.id}" />
					</h:link>
				</h:form>
	    	</h:column>
	    	
	    	<h:column>
				<f:facet name="header">Libelle</f:facet>
	    		#{categorie.libelle}
	    	</h:column>
	    	    	
	    	<h:column>
				<f:facet name="header">Modifier</f:facet>
				<h:form>
					<h:link outcome="modifierCategorieForm.xhtml" value="Modifier">
						<f:param name="idCategorie" value="#{categorie.id}" />
					</h:link>
				</h:form>
			</h:column>
	    	 
	    	<h:column>
				<f:facet name="header">Supprimer</f:facet>
	    		<h:form>
	    			<h:link outcome="supprimerCategorie.xhtml" value="Supprimer">
						<f:param name="idCategorie" value="#{categorie.id}" />
					</h:link>
				</h:form>
	    	</h:column>
	    	
		</h:dataTable>
	
	</ui:define>
</ui:composition>